<?php
namespace app\common\validate;

use think\Validate;

class Tag extends Validate
{
    protected $rule = [
        'name'      =>  'require|unique:tag',
        'flag'      =>  'require|unique:tag',

    ];
    protected $message = [
        'name.require'      =>  '栏目名必填',
        'name.unqiue'       =>  '栏目名已存在',
        'flag.require'      =>  '标识名必填',
        'flag.unqiue'       =>  '标识名已存在',
    ];
    protected $scene = [
        'insert'=>['name','flag'],
        'update'=>['name','flag'],
    ];
}
